<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head>
<title>misc/syntax/tt.syntax</title>
<meta name='robots' content='noindex,nofollow' />
<meta name='generator' content='GLOBAL-6.5.7' />
<meta http-equiv='Content-Style-Type' content='text/css' />
<link rel='stylesheet' type='text/css' href='../style.css' />
</head>
<body>
<!-- beginning of fixed guide -->
<div id='guide'><ul>
<li><a href='#TOP'><img class='icon' src='../icons/first.png' alt='[^]' /></a></li>
<li><a href='#BOTTOM'><img class='icon' src='../icons/last.png' alt='[v]' /></a></li>
<li><a href='#TOP'><img class='icon' src='../icons/top.png' alt='[top]' /></a></li>
<li><a href='#BOTTOM'><img class='icon' src='../icons/bottom.png' alt='[bottom]' /></a></li>
<li><a href='../mains.html'><img class='icon' src='../icons/index.png' alt='[index]' /></a></li>
<li><a href='../help.html'><img class='icon' src='../icons/help.png' alt='[help]' /></a></li>
<li class='standout'><span><a href='../files/misc.html'>misc</a>/<a href='../files/misc--syntax.html'>syntax</a>/tt.syntax</span></li>
</ul></div>
<!-- end of fixed guide -->
<a id='TOP' name='TOP'></a><h2 class='header'><a href='../mains.html'>root</a>/<a href='../files/misc.html'>misc</a>/<a href='../files/misc--syntax.html'>syntax</a>/tt.syntax</h2>
<em class='comment'>/* <img class='icon' src='../icons/n_left.png' alt='[previous]' /><img class='icon' src='../icons/n_right.png' alt='[next]' /><img class='icon' src='../icons/n_first.png' alt='[first]' /><img class='icon' src='../icons/n_last.png' alt='[last]' /><img class='icon' src='../icons/n_top.png' alt='[top]' /><a href='#BOTTOM'><img class='icon' src='../icons/bottom.png' alt='[bottom]' /></a><a href='../mains.html'><img class='icon' src='../icons/index.png' alt='[index]' /></a><a href='../help.html'><img class='icon' src='../icons/help.png' alt='[help]' /></a>&nbsp;<input type='text' readonly onfocus='this.select();' value='+1 misc/syntax/tt.syntax'  /> */</em>
<hr />
<pre>
<a id='L1' name='L1'></a>#
<a id='L2' name='L2'></a># Dan Dascalescu
<a id='L3' name='L3'></a># Template::Toolkit syntax file
<a id='L4' name='L4'></a># HTML entities
<a id='L5' name='L5'></a>#
<a id='L6' name='L6'></a>context default
<a id='L7' name='L7'></a>    keyword &amp;\[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\]; brightgreen
<a id='L8' name='L8'></a>    keyword &amp;#\{xX\}\[0123456789abcdefABCDEF\]; brightgreen
<a id='L9' name='L9'></a>    keyword &amp;#\[0123456789\]; brightgreen
<a id='L10' name='L10'></a> 
<a id='L11' name='L11'></a># Although TT is most often used to generate HTML, it's not *only* used for that, so assuming HTML around it may be presumptuous anyway.
<a id='L12' name='L12'></a># Since cooledit doesn't support sub-context, we can't have TT *in* HTML, like &lt;img src="[% image_url %]"&gt;
<a id='L13' name='L13'></a># The best possible workaround, which still sucks, is to uncomment the line below, which will highlight any HTML tags that don't contain a '[', but without special highlight for strings, and without any HTML-specific keywords
<a id='L14' name='L14'></a>#    keyword &lt;\[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890\s"#$%&amp;'()*+,-.=?@\\\]^_`{|}~\]&gt; green
<a id='L15' name='L15'></a>    spellcheck
<a id='L16' name='L16'></a> 
<a id='L17' name='L17'></a># TT directives - http://template-toolkit.org/docs/manual/Directives.html
<a id='L18' name='L18'></a>context [% %] red black
<a id='L19' name='L19'></a>    keyword whole GET yellow
<a id='L20' name='L20'></a>    keyword whole CALL yellow
<a id='L21' name='L21'></a>    keyword whole SET yellow
<a id='L22' name='L22'></a>    keyword whole DEFAULT yellow
<a id='L23' name='L23'></a> 
<a id='L24' name='L24'></a>    keyword whole INSERT yellow
<a id='L25' name='L25'></a>    keyword whole INCLUDE yellow
<a id='L26' name='L26'></a>    keyword whole PROCESS yellow
<a id='L27' name='L27'></a>    keyword whole WRAPPER yellow
<a id='L28' name='L28'></a>    keyword whole BLOCK yellow
<a id='L29' name='L29'></a> 
<a id='L30' name='L30'></a>    keyword whole IF yellow
<a id='L31' name='L31'></a>    keyword whole UNLESS yellow
<a id='L32' name='L32'></a>    keyword whole ELSIF yellow
<a id='L33' name='L33'></a>    keyword whole ELSE yellow
<a id='L34' name='L34'></a>    keyword whole SWITCH yellow
<a id='L35' name='L35'></a>    keyword whole CASE yellow
<a id='L36' name='L36'></a> 
<a id='L37' name='L37'></a>    keyword whole FOREACH yellow
<a id='L38' name='L38'></a>    keyword whole IN yellow
<a id='L39' name='L39'></a>    keyword whole WHILE yellow
<a id='L40' name='L40'></a> 
<a id='L41' name='L41'></a>    keyword whole FILTER yellow
<a id='L42' name='L42'></a>    keyword whole USE yellow
<a id='L43' name='L43'></a>    keyword whole MACRO yellow
<a id='L44' name='L44'></a>    keyword whole PERL yellow
<a id='L45' name='L45'></a>    keyword whole RAWPERL yellow
<a id='L46' name='L46'></a> 
<a id='L47' name='L47'></a>    keyword whole TRY yellow
<a id='L48' name='L48'></a>    keyword whole THROW yellow
<a id='L49' name='L49'></a>    keyword whole CATCH yellow
<a id='L50' name='L50'></a>    keyword whole FINAL yellow
<a id='L51' name='L51'></a> 
<a id='L52' name='L52'></a>    keyword whole NEXT yellow
<a id='L53' name='L53'></a>    keyword whole LAST yellow
<a id='L54' name='L54'></a>    keyword whole RETURN yellow
<a id='L55' name='L55'></a>    keyword whole STOP yellow
<a id='L56' name='L56'></a>    keyword whole CLEAR yellow
<a id='L57' name='L57'></a>    keyword whole META yellow
<a id='L58' name='L58'></a>    keyword whole TAGS yellow
<a id='L59' name='L59'></a>    keyword whole DEBUG yellow
<a id='L60' name='L60'></a> 
<a id='L61' name='L61'></a>    keyword whole END yellow
<a id='L62' name='L62'></a> 
<a id='L63' name='L63'></a># AND, OR and NOT are apparently not documented
<a id='L64' name='L64'></a>    keyword whole AND white
<a id='L65' name='L65'></a>    keyword whole OR white
<a id='L66' name='L66'></a>    keyword whole NOT white
<a id='L67' name='L67'></a>    keyword | white
<a id='L68' name='L68'></a> 
<a id='L69' name='L69'></a># TT VMethods - http://template-toolkit.org/docs/manual/VMethods.html
<a id='L70' name='L70'></a>    keyword .defined brown
<a id='L71' name='L71'></a>    keyword .length brown
<a id='L72' name='L72'></a>    keyword .repeat brown
<a id='L73' name='L73'></a>    keyword .replace brown
<a id='L74' name='L74'></a>    keyword .remove brown
<a id='L75' name='L75'></a>    keyword .match brown
<a id='L76' name='L76'></a>    keyword .search brown
<a id='L77' name='L77'></a>    keyword .split brown
<a id='L78' name='L78'></a>    keyword .chunk brown
<a id='L79' name='L79'></a>    keyword .substr brown
<a id='L80' name='L80'></a>    keyword .list brown
<a id='L81' name='L81'></a>    keyword .hash brown
<a id='L82' name='L82'></a>    keyword .size brown
<a id='L83' name='L83'></a>    keyword .keys brown
<a id='L84' name='L84'></a>    keyword .values brown
<a id='L85' name='L85'></a>    keyword .items brown
<a id='L86' name='L86'></a>    keyword .each brown
<a id='L87' name='L87'></a>    keyword .pairs brown
<a id='L88' name='L88'></a>    keyword .sort brown
<a id='L89' name='L89'></a>    keyword .nsort brown
<a id='L90' name='L90'></a>    keyword .import brown
<a id='L91' name='L91'></a>    keyword .exists brown
<a id='L92' name='L92'></a>    keyword .delete brown
<a id='L93' name='L93'></a>    keyword .item brown
<a id='L94' name='L94'></a>    keyword .first brown
<a id='L95' name='L95'></a>    keyword .last brown
<a id='L96' name='L96'></a>    keyword .max brown
<a id='L97' name='L97'></a>    keyword .reverse brown
<a id='L98' name='L98'></a>    keyword .join brown
<a id='L99' name='L99'></a>    keyword .grep brown
<a id='L100' name='L100'></a>    keyword .unshift brown
<a id='L101' name='L101'></a>    keyword .push brown
<a id='L102' name='L102'></a>    keyword .shift brown
<a id='L103' name='L103'></a>    keyword .pop brown
<a id='L104' name='L104'></a>    keyword .unique brown
<a id='L105' name='L105'></a>    keyword .merge brown
<a id='L106' name='L106'></a>    keyword .slice brown
<a id='L107' name='L107'></a>    keyword .splice brown
<a id='L108' name='L108'></a> 
<a id='L109' name='L109'></a>    keyword "*" green
<a id='L110' name='L110'></a>    keyword '*' brightgreen
<a id='L111' name='L111'></a> 
<a id='L112' name='L112'></a># HTML comments
<a id='L113' name='L113'></a>context &lt;!-- --&gt; brown
<a id='L114' name='L114'></a>    spellcheck
<a id='L115' name='L115'></a> 
<a id='L116' name='L116'></a># HTML DOCTYPE
<a id='L117' name='L117'></a>context &lt;! &gt; brightred/orange
<a id='L118' name='L118'></a>    spellcheck
<a id='L119' name='L119'></a> 
<a id='L120' name='L120'></a># HTML end tags
<a id='L121' name='L121'></a>context &lt;/ &gt; brightcyan
<a id='L122' name='L122'></a> 
<a id='L123' name='L123'></a># HTML open tags - enabling this will hide TT syntax in HTML, e.g. &lt;img src="[% image_url %]"&gt;
<a id='L124' name='L124'></a>#context &lt; &gt; brightcyan
<a id='L125' name='L125'></a>#   keyword "*" green
<a id='L126' name='L126'></a>#   keyword = yellow
</pre>
<hr />
<a id='BOTTOM' name='BOTTOM'></a>
<em class='comment'>/* <img class='icon' src='../icons/n_left.png' alt='[previous]' /><img class='icon' src='../icons/n_right.png' alt='[next]' /><img class='icon' src='../icons/n_first.png' alt='[first]' /><img class='icon' src='../icons/n_last.png' alt='[last]' /><a href='#TOP'><img class='icon' src='../icons/top.png' alt='[top]' /></a><img class='icon' src='../icons/n_bottom.png' alt='[bottom]' /><a href='../mains.html'><img class='icon' src='../icons/index.png' alt='[index]' /></a><a href='../help.html'><img class='icon' src='../icons/help.png' alt='[help]' /></a>&nbsp;<input type='text' readonly onfocus='this.select();' value='+126 misc/syntax/tt.syntax'  /> */</em>
</body>
</html>
